﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections;

namespace devtm.Aop.Convert
{
    
    class ContainerTypeDefiniton
    {

              
        public Mono.Cecil.TypeDefinition Key { get; set; }

        public ContainerTypeDefiniton(Mono.Cecil.TypeDefinition key)
        {
            this.Key = key;
        }

        private Hashtable _dicTraitement = new Hashtable();

        internal void Add(Mono.Cecil.CustomAttribute item)
        {

            if (!_dicTraitement.ContainsKey(item.AttributeType.Name))
                _dicTraitement.Add(item.AttributeType.Name, item);
            

        }

        public IEnumerable<Mono.Cecil.CustomAttribute> Get()
        {

            foreach (Mono.Cecil.CustomAttribute item in _dicTraitement.Values)
                yield return item;
            
        }
    }
}
